package com.ucampus.dao.sql;

import org.apache.ibatis.jdbc.SQL;

public class BuildingSql {
    public String update(int id,String name, String introduction) {
        return new SQL(){{
            UPDATE("building");
            if (name != null) {
                SET("name = #{name}");
            }
            if (introduction != null) {
                SET("introduction = #{introduction}");
            }
            WHERE("id = #{id}");
        }}.toString();
    }
}
